{yun:}include file="$wapstyle/member/lheader.htm"{/yun}

<script src="{yun:}$wap_style{/yun}/js/jsMath.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>

<script>
	//var integral = '{yun:}$statis.pay{/yun}';
	var jobid = '{yun:}$info.id{/yun}';

	function myFunction(_this) {
		_this.value = _this.value.replace(/[^0-9]/g, '');
	}

	function checkNum(integral, integral_pro) {
		var dkjf = $("#dkjf").val();

		if (dkjf) {
			$("#dkhdiv").show();
		}
		var need = $(".pricehtml").text();
		var need_jifen = accMul(need, integral_pro);
		if (parseInt(integral) >= parseInt(need_jifen)) {
			if (parseInt(dkjf) > parseInt(need_jifen)) {
				$("#dkjf").val(parseInt(need_jifen));
				var dkjfh = accSub(need, accDiv(need_jifen, integral_pro));
			} else {
				var dkjfh = accSub(need, accDiv(dkjf, integral_pro));
			}
		} else {
			if (parseInt(dkjf) > parseInt(integral)) {
				$("#dkjf").val(parseInt(integral));
				var dkjfh = accSub(need, accDiv(integral, integral_pro));
			} else {
				var dkjfh = accSub(need, accDiv(dkjf, integral_pro));
			}
		}
		if (dkjfh <= 0) {
			$("#dkjfh_pricehtml").html(0);
			$("#zffs").hide();
			$("#dkzf_btn").show();
		} else {
			$("#dkjfh_pricehtml").html(dkjfh);
			$("#zffs").show();
			$("#dkzf_btn").hide();
		}
	}

	/**
	 *	全额抵扣功能
	 */
	function qrzf(type, jobid) {
		var jobid = jobid;

		if (type == 'refreshjob') {
			$.post("index.php?c=dkzf", {
				jobid : jobid
			}, function(data) {
				var data = eval('(' + data + ')');
				if (data.error == '0') { //成功
					layermsg(data.msg, 2, function() {
						location.href = "index.php?c=job";
					});
					return false;
				} else {
					if (data.url) {
						layermsg(data.msg, 2, function() {
							location.href = "index.php?c=pay";
						});
						return false;
					} else {
						layermsg(data.msg, 2, function() {
							location.reload(true);
						});
						return false;
					}
				}
			});
		} else if (type == 'downresume') {
			$.post("index.php?c=dkzf",{
				eid : jobid
			}, function(data) {
				var data = eval('(' + data + ')');
				if (data.error == '0') { //成功
					layermsg(data.msg, 2, function() {
						location.href = "{yun:}url m=wap c=resume a=show id=$smarty.get.id{/yun}";
					});
					return false;
				} else {
					if (data.url) {
						layermsg(data.msg, 2, function() {
							location.href = "index.php?c=pay";
						});
						return false;
					} else {
						layermsg(data.msg, 2, function() {
							location.reload(true);
						});
						return false;
					}
				}
			});
		} else if (type == 'issuejob') {
			$.post("index.php?c=dkzf", {
				issuejob : 1
			}, function(data) {
				var data = eval('(' + data + ')');
				if (data.error == '0') { //成功
					layermsg(data.msg, 2, function() {
						location.href = "index.php?c=jobadd";
					});
					return false;
				} else {
					if (data.url) {
						layermsg(data.msg, 2, function() {
							location.href = "index.php?c=pay";
						});
						return false;
					} else {
						layermsg(data.msg, 2, function() {
							location.reload(true);
						});
						return false;
					}
				}
			});
		}
	}

	function paycheck(type) {
		var type;
		if (type == "wxpay") {
			$(".wxpay").addClass("member_set_meal_fk_xz_cur");
			$(".alipay").removeClass("member_set_meal_fk_xz_cur");
			$("#paytype").val('wxpay');

		} else if (type == "alipay") {
			$(".alipay").addClass("member_set_meal_fk_xz_cur");
			$(".wxpay").removeClass("member_set_meal_fk_xz_cur");
			$("#paytype").val('alipay');

		}
	}

	function pay_form(type) {
		var paytype = $('#paytype').val();

		if (paytype == "") {
		
			layermsg('请选择一种支付方式！', 2);
			return false;
		}  
		return true;
	}
	
</script>

<section class="wap_member">

	{yun:}if $smarty.get.server=='1'{/yun}
	<div class="wap_member_comp_h1">
		<span>刷新职位</span>
	</div>
	<!--刷新猎头职位-->
	<div class="getserbver_box">
		<form action="index.php?c=getOrder" method="post" onsubmit="return pay_form('refresh_job');">
			<ul class="getserbver_box_list">
				<li>
					<div class="getserbver_box_list_p">
						所需{yun:}if $config.com_integral_online==3{/yun}{yun:}$config.integral_pricename{/yun}：{yun:}else{/yun}金额：{yun:}/if{/yun}
						{yun:}if $config.com_integral_online==3{/yun} 
							<span class="getserbver_box_s pricehtml">{yun:}$config.integral_proportion * $config.integral_jobefresh{/yun} </span>{yun:}$config.integral_pricename{/yun}
						{yun:}else{/yun} 
							<span class="getserbver_box_s pricehtml">{yun:}$config.integral_jobefresh{/yun}</span>元
						{yun:}/if{/yun}
					</div>
				</li> 
				
				{yun:}if $config.com_integral_online==3{/yun}
				<li>
					<div class="getserbver_box_list_p">
						账户{yun:}$config.integral_pricename{/yun}：<span class="getserbver_box_s">{yun:}$statis.integral{/yun}</span> （1元 = {yun:}$config.integral_proportion{/yun}{yun:}$config.integral_pricename{/yun}）
					</div>
				</li> 
				{yun:}/if{/yun} 
				
				{yun:}if $config.com_integral_online==1{/yun}
				<li>
					<div class=" getserbver_box_list_p_dk">
						<span class="getserbver_box_list_p_dk_name">抵扣{yun:}$config.integral_pricename{/yun}：</span>
						<input type="text" name="dkjf" id="dkjf" onkeyup="checkNum('{yun:}$statis.integral{/yun}','{yun:}$config.integral_proportion{/yun}');" oninput="myFunction(this)" class="getserbver_box_list_r_zdy_bth">
					</div>
				</li>
				<li>
					<div class="getserbver_box_list_p">
						账户{yun:}$config.integral_pricename{/yun}：<span class="getserbver_box_s">{yun:}$statis.integral{/yun}</span> （1元 = {yun:}$config.integral_proportion{/yun}{yun:}$config.integral_pricename{/yun}）
					</div>
				</li>
				{yun:}/if{/yun}
				
				<li id="dkhdiv" style="display: none">
					<div class="getserbver_box_list_p">
						抵后金额：<span id="dkjfh_pricehtml" class="getserbver_box_s"></span>元
					</div>
				</li>
			</ul>

			<div id="zffs" {yun:}if $config.integral_jobefresh == 0 || $config.com_integral_online==3{/yun} style="display: none"{yun:}/if{/yun}>
				{yun:}if $paytype.wxpay{/yun}
					<div class="spread_box spread_box_bor">
						<div class="spread_zf_list" onclick="paycheck('wxpay');">
							<i class="wxpay member_set_meal_fk_xz" style="top: 0"></i> 微信支付
						</div>
					</div>
				{yun:}/if{/yun} 
				{yun:}if $paytype.alipay{/yun}
					<div class="spread_box spread_box_bor" onclick="paycheck('alipay');">
						<div class="spread_zf_list spread_zf_list_zfb">
							<i class="alipay member_set_meal_fk_xz" style="top: 0"></i> 支付宝支付
						</div>
					</div>
				{yun:}/if{/yun}
				
				{yun:}if $paytype.wxpay||$paytype.alipay{/yun}
				<div class="getserbver_box_bth">
					<div class="pay_com_lsit_right">
						<input type="submit" value="确认支付" name='nextstep' class='reinputText2'>
					</div>
				</div>
				{yun:}else{/yun}
					<div class="pay_zfgb_tip">
						<span>网站已关闭支付功能，请联系管理员！</span>
					</div>
				{yun:}/if{/yun}
			</div>
			<div class="getserbver_box_bth" id="dkzf_btn" {yun:}if $config.integral_jobefresh != 0 && $config.com_integral_online!=3{/yun} style="display: none"{yun:}/if{/yun}>
				<div class="pay_com_lsit_right">
					<input type="button" value="确认支付" onClick="qrzf('refreshjob','{yun:}$smarty.get.id{/yun}');" class="reinputText2">
				</div>
			</div>

			{yun:}if $config.sy_freewebtel{/yun}
			<div class="getserbver_box_tel">
				<a href="tel:{yun:}$config.sy_freewebtel{/yun}">客服电话：{yun:}$config.sy_freewebtel{/yun}</a>
			</div>
			{yun:}/if{/yun} 
			
			<input name="paytype" id="paytype" type="hidden" value="" /> 
			<input name="server" id="server" type="hidden" value="refresh_job" /> 
			<input name="jobid" id="jobid" type="hidden" value="{yun:}$smarty.get.id{/yun}" />
		</form>
	</div>

	{yun:}elseif $smarty.get.server=='7'{/yun}
	<div class="wap_member_comp_h1">
		<span>下载简历</span>
	</div>
	<!--下载简历-->
	<div class="getserbver_box">
		<form action="index.php?c=getOrder" method="post" onsubmit="return pay_form('downresume');">
			<ul class="getserbver_box_list">
				<li>
					<div class="getserbver_box_list_p">
						所需{yun:}if $config.com_integral_online==3{/yun}{yun:}$config.integral_pricename{/yun}：{yun:}else{/yun}金额：{yun:}/if{/yun}
						{yun:}if $config.com_integral_online==3{/yun} 
							<span class="getserbver_box_s pricehtml">{yun:}$config.integral_proportion * $resume_price{/yun} </span>{yun:}$config.integral_pricename{/yun}
						{yun:}else{/yun} 
							<span class="getserbver_box_s pricehtml">{yun:}$resume_price{/yun}</span>元
						{yun:}/if{/yun}
					</div>
				</li> 
				
				{yun:}if $config.com_integral_online==3{/yun}
				<li>
					<div class="getserbver_box_list_p">
						账户{yun:}$config.integral_pricename{/yun}：<span class="getserbver_box_s">{yun:}$statis.integral{/yun}</span> （1元 = {yun:}$config.integral_proportion{/yun}{yun:}$config.integral_pricename{/yun}）
					</div>
				</li> 
				{yun:}/if{/yun} 
				
				{yun:}if $config.com_integral_online==1{/yun}
				<li>
					<div class=" getserbver_box_list_p_dk">
						<span class="getserbver_box_list_p_dk_name">抵扣{yun:}$config.integral_pricename{/yun}：</span>
						<input type="text" name="dkjf" id="dkjf" onkeyup="checkNum('{yun:}$statis.integral{/yun}','{yun:}$config.integral_proportion{/yun}');" oninput="myFunction(this)" class="getserbver_box_list_r_zdy_bth" placeholder="请输入抵扣数量">
					</div>
				</li>
				<li>
					<div class="getserbver_box_list_p">
						账户{yun:}$config.integral_pricename{/yun}：<span class="getserbver_box_s">{yun:}$statis.integral{/yun}</span> （1元 = {yun:}$config.integral_proportion{/yun}{yun:}$config.integral_pricename{/yun}）
					</div>
				</li> 
				{yun:}/if{/yun}
				
				<li id="dkhdiv" style="display: none">
					<div class="getserbver_box_list_p">
						抵后金额：<span id="dkjfh_pricehtml" class="getserbver_box_s"></span>元
					</div>
				</li>

			</ul>

			<div id="zffs" {yun:}if $config.integral_down_resume == 0 || $config.com_integral_online==3{/yun} style="display: none"{yun:}/if{/yun}>
				{yun:}if $paytype.wxpay{/yun}
					<div class="spread_box spread_box_bor">
						<div class="spread_zf_list" onclick="paycheck('wxpay');">
							<i class="wxpay member_set_meal_fk_xz" style="top: 0"></i> 微信支付
						</div>
					</div>
				{yun:}/if{/yun} 
				{yun:}if $paytype.alipay{/yun}
					<div class="spread_box spread_box_bor" onclick="paycheck('alipay');">
						<div class="spread_zf_list spread_zf_list_zfb">
							<i class="alipay member_set_meal_fk_xz" style="top: 0"></i> 支付宝支付
						</div>
					</div>
				{yun:}/if{/yun} 
				{yun:}if $paytype.wxpay||$paytype.alipay{/yun}
					<div class="getserbver_box_bth">
						<div class="pay_com_lsit_right">
							<input type="submit" value="确认支付" name='nextstep' class="reinputText2">
						</div>
					</div>
				{yun:}else{/yun}
					<div class="pay_zfgb_tip">
						<span>网站已关闭支付功能，请联系管理员！</span>
					</div>
				{yun:}/if{/yun}
			</div>
			<div class="getserbver_box_bth" id="dkzf_btn" {yun:}if $config.integral_down_resume !=0 && $config.com_integral_online !=3{/yun} style="display: none"{yun:}/if{/yun}>
				<div class="pay_com_lsit_right">
					<input type="button" value="确认支付" onClick="qrzf('downresume','{yun:}$smarty.get.id{/yun}');" class="reinputText2">
				</div>
			</div>

			{yun:}if $config.sy_freewebtel{/yun}
			<div class="getserbver_box_tel">
				<a href="tel:{yun:}$config.sy_freewebtel{/yun}">客服电话：{yun:}$config.sy_freewebtel{/yun}</a>
			</div>
			{yun:}/if{/yun} 
			
			<input name="paytype" id="paytype" type="hidden" value="" /> 
			<input name="server" id="server" type="hidden" value="downresume" /> 
			<input name="eid" id="eid" type="hidden" value="{yun:}$smarty.get.id{/yun}" />
		</form>
	</div>
	{yun:}elseif $smarty.get.server=='8'{/yun}
	<div class="wap_member_comp_h1">
		<span>发布职位</span>
	</div>
	<!-- 发布高级职位-->
	<div class="getserbver_box">
		<form action="index.php?c=getOrder" method="post" onsubmit="return pay_form('issuejob');">
			<ul class="getserbver_box_list">
				<li>
					<div class="getserbver_box_list_p">
						所需{yun:}if $config.com_integral_online==3{/yun}{yun:}$config.integral_pricename{/yun}：{yun:}else{/yun}金额：{yun:}/if{/yun}
						{yun:}if $config.com_integral_online==3{/yun} 
							<span class="getserbver_box_s pricehtml">{yun:}$config.integral_proportion * $config.integral_job{/yun} </span>{yun:}$config.integral_pricename{/yun}
						{yun:}else{/yun} 
							<span class="getserbver_box_s pricehtml">{yun:}$config.integral_job{/yun}</span>元
						{yun:}/if{/yun}
					</div>
				</li> 
				
				{yun:}if $config.com_integral_online==3{/yun}
				<li>
					<div class="getserbver_box_list_p">
						账户{yun:}$config.integral_pricename{/yun}：<span
							class="getserbver_box_s">{yun:}$statis.integral{/yun}</span> （1元
						=
						{yun:}$config.integral_proportion{/yun}{yun:}$config.integral_pricename{/yun}）
					</div>
				</li> 
				{yun:}/if{/yun} 
				
				{yun:}if $config.com_integral_online==1{/yun}
				<li>
					<div class=" getserbver_box_list_p_dk">
						<span class="getserbver_box_list_p_dk_name"> 抵扣{yun:}$config.integral_pricename{/yun}：</span>
						<input type="text" name="issue_dkjf" id="dkjf" onkeyup="checkNum('{yun:}$statis.integral{/yun}','{yun:}$config.integral_proportion{/yun}');" oninput="myFunction(this)" class="getserbver_box_list_r_zdy_bth" placeholder="请输入抵扣数量" />
					</div>
				</li>
				<li>
					<div class="getserbver_box_list_p">
						账户{yun:}$config.integral_pricename{/yun}：<span class="getserbver_box_s">{yun:}$statis.integral{/yun}</span> （1元 = {yun:}$config.integral_proportion{/yun}{yun:}$config.integral_pricename{/yun}）
					</div>
				</li> 
				{yun:}/if{/yun}
				
				<li id="dkhdiv" style="display: none">
					<div class="getserbver_box_list_p">
						抵后金额：<span id="dkjfh_pricehtml" class="getserbver_box_s"></span>元
					</div>
				</li>

			</ul>

			<div id="zffs" {yun:}if $config.integral_job == 0 || $config.com_integral_online==3{/yun} style="display: none"{yun:}/if{/yun}>
				{yun:}if $paytype.wxpay{/yun}
				<div class="spread_box spread_box_bor">
					<div class="spread_zf_list" onclick="paycheck('wxpay');">
						<i class="wxpay member_set_meal_fk_xz" style="top: 0"></i> 微信支付
					</div>
				</div>
				{yun:}/if{/yun}
				
				{yun:}if $paytype.alipay{/yun}
				<div class="spread_box spread_box_bor" onclick="paycheck('alipay');">
					<div class="spread_zf_list spread_zf_list_zfb">
						<i class="alipay member_set_meal_fk_xz" style="top: 0"></i> 支付宝支付
					</div>
				</div>
				{yun:}/if{/yun} 
				
				{yun:}if $paytype.wxpay||$paytype.alipay{/yun}
				<div class="getserbver_box_bth">
					<div class="pay_com_lsit_right">
						<input type="submit" value="确认支付" name='nextstep' class="reinputText2">
					</div>
				</div>
				{yun:}else{/yun}
				<div class="pay_zfgb_tip">
					<span>网站已关闭支付功能，请联系管理员！</span>
				</div>
				{yun:}/if{/yun}
			</div>
			<div class="getserbver_box_bth" id="dkzf_btn" {yun:}if $config.integral_job !=0 && $config.com_integral_online !=3{/yun} style="display: none"{yun:}/if{/yun}>
				<div class="pay_com_lsit_right">
					<input type="button" value="确认支付" onClick="qrzf('issuejob','');" class="reinputText2">
				</div>
			</div>

			{yun:}if $config.sy_freewebtel{/yun}
				<div class="getserbver_box_tel">
					<a href="tel:{yun:}$config.sy_freewebtel{/yun}">客服电话：{yun:}$config.sy_freewebtel{/yun}</a>
				</div>
			{yun:}/if{/yun} 
			<input name="paytype" id="paytype" type="hidden" value="" /> 
			<input name="server" id="server" type="hidden" value="issue_job" /> 
			<input name="issuejob" type="hidden" value="1" />
		</form>
	</div>
	{yun:}/if{/yun}
</section>
<div class="clear"></div>
{yun:}include file="$wapstyle/footer.htm"{/yun}
